package adapterPattern;

public class SquarePegadapter extends RoundPeg{
    private SquarePeg squarePeg;
    public SquarePegadapter(SquarePeg squarePeg){
        this.squarePeg=squarePeg;
    }

    @Override
    public double getRadius() {
        return Math.sqrt(Math.pow(squarePeg.getWidth()/2,2)*2);
    }
}
